package com.weharvest.edu.utlis;

import com.weharvest.edu.enums.ResultEnum;
import com.weharvest.edu.exception.EduException;
import net.minidev.json.JSONObject;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class SessionUtil {
    public  static  String  getSession(HttpServletRequest request,String params){
        Object obj = request.getSession().getAttribute(params);
        if(null == obj){
            throw new EduException(ResultEnum.SESSION_UID_ERROR);
        }
        return obj.toString();
    }

}
